package priv.wangy.micro.common.factory;

import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

/**
 * @author wangy
 * @since 2023-12-19
 */
@Component
public class MyApplicationFactory {

    private final Environment environment;

    public MyApplicationFactory(Environment environment) {
        this.environment = environment;
    }

    public String getName() {
        return environment.getProperty("spring.application.name");
    }

}
